package com.tuhao.www.serviceImpl.user;

import com.tuhao.www.dao.user.UserDao;
import com.tuhao.www.domain.user.User;
import com.tuhao.www.service.user.UserModelService;
import com.tuhao.www.serviceImpl.BaseServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service("userModelService")
@Transactional(rollbackFor = Exception.class)//注解事物回滚
public class UserModelServiceImpl extends BaseServiceImpl<User> implements UserModelService {
    @Resource
    private UserDao userDao;

    @Override
    public int save(User user) {
        userDao.insert(user);
        String s = null;
        s.indexOf("a");
        return 1;

    }
}
